package base.day18.array;

import java.util.Arrays;

public class Array4 {
    public static void main(String[] args) {
        int[] array1={3,1,5,6,4};
        System.out.println(Arrays.toString(array1));
        Arrays.sort(array1);

        for (int i = 0; i < array1.length; i++) {
            System.out.println(array1[i]);
        }

        System.out.println(Arrays.toString(array1));

        int index= Arrays.binarySearch(array1,3);
        System.out.println(index);
    }

}
